﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="RoleList.aspx.cs" Inherits="Wicresoft.RDW.Manage.RoleList" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div class="center">
        <div class="box">
            <div class="main_title">
                <h2>
                    <%=Resources.NameResource.RoleList%></h2>
            </div>
            <%--<div class="MyApplicationContent2">
                <div class="MyApplicationContent_right">
                    <asp:Button ID="btnShow" runat="server" Text="添加角色" OnClick="btnShowOnClick" visible="false"/>
                </div>
                <div class="clear">
                </div>
            </div>--%>
            <div class="HistoryApplicationContent">
                <table cellspacing="0" rules="all" border="1" style="width:100%;border-collapse:collapse;">
		        <tr class="dcTableHeader">
			        <th scope="col"><%=Resources.NameResource.Role_Name%></th>
                    <th scope="col"><%=Resources.NameResource.Role_Desc%></th>
                    <th scope="col"><%=Resources.ManageResource.mgr_lblAction%></th>
		        </tr>
                <asp:Repeater ID="rptRole" runat="server" OnItemDataBound="GvRoleList_RowDataBound">
                <ItemTemplate>
                    <tr class="dcTableItem" 
                        <asp:Literal ID="litStyle" runat="server"></asp:Literal>>
			            <td style="width:180px;"> <%#Eval("Name")%></td>
                        <td class="dcTableLeft"> <%#Eval("Desc")%> </td>
                        <td style="width:140px;">
                             <a class="CommandButton" href="RoleView.aspx?PageStatus=edit&id= <%#Eval("RoleId")%>">
                                 <asp:Literal ID="litEdit" runat="server" Text="编辑"></asp:Literal>
                             </a>
                        </td>
		            </tr>
                    <asp:PlaceHolder ID="phSiteManager" runat="server" Visible="false">
                    <tr>
                        <td colspan="3">
                            <table cellspacing="0" rules="all" border="1" style="width:100%;border-collapse:collapse;">
                            <asp:Repeater ID="rptSiteManager" runat="server"  OnItemDataBound="rptSiteManager_DataBound" >
                            <ItemTemplate>
                                <tr class="dcTableAlternatingItem">
			                        <td style="width:180px;"> <%#Eval("Name")%></td>
                                    <td class="dcTableLeft"> <%#Eval("Desc")%> </td>
                                    <td style="width:140px;">
                                         <a class="CommandButton" href="RoleView.aspx?PageStatus=edit&id= <%#Eval("RoleId")%>">编辑</a>
                                    </td>
		                        </tr>
                                <asp:PlaceHolder ID="phLabManager" runat="server" Visible="false">
                                <tr style="display:none;">
                                    <td colspan="3">
                                        <table cellspacing="0" rules="all" border="1" style="width:100%;border-collapse:collapse;">
                                        <asp:Repeater ID="rptLabManager" runat="server" >
                                        <ItemTemplate>
                                            <tr class="dcTableItem">
			                                    <td style="width:180px;"> <%#Eval("Name")%></td>
                                                <td class="dcTableLeft"> <%#Eval("Desc")%> </td>
                                                <td style="width:140px;">
                                                     <a class="CommandButton" href="RoleView.aspx?PageStatus=edit&id= <%#Eval("RoleId")%>">编辑</a>
                                                </td>
		                                    </tr>
                                         </ItemTemplate>
                                         </asp:Repeater>
                                         </table>
                                    </td>
                                </tr>
                                </asp:PlaceHolder>
                            </ItemTemplate>
                            </asp:Repeater>
                            </table>
                        </td>
                    </tr>
                    </asp:PlaceHolder>
                </ItemTemplate>
                </asp:Repeater>
                </table>
                
            </div>
        </div>
    </div>
    <script type="text/javascript">
        $(function () {
            var trSiteManager = $("#trSiteManager");
            var tableSiteManager = trSiteManager.next("tr");

            var trLocation = tableSiteManager.find(".dcTableAlternatingItem");


            tableSiteManager.hide();

            trSiteManager.click(function () {
                tableSiteManager.toggle();
            });

            $(trLocation).css("cursor", "pointer");
            $(trLocation).click(function () {
                var tableLab = $(this).next("tr");
                tableLab.toggle();
            });
        });
    </script>
</asp:Content>
